$INCLUDE: 'C:\FG\FASTGRAF.FI'

      PROGRAM MAIN

      INTEGER NEW_MODE, OLD_MODE
      INTEGER FG_BESTMODE, FG_GETMODE

      CALL FG_INITPM
      NEW_MODE = FG_BESTMODE(320,200,1)
      IF (NEW_MODE .LT. 0 .OR. NEW_MODE .EQ. 12) THEN
         STOP 'This program requires a 320 x 200 color graphics mode.'
      END IF
      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(NEW_MODE)

      CALL FG_SETCOLOR(7)
      CALL FG_RECT(0,159,0,99)
      CALL FG_SETCOLOR(9)
      CALL FG_LOCATE(6,6)
      CALL FG_TEXT('quadrant',8)
      CALL FG_WAITKEY

      CALL FG_TCMASK(#0202)
      CALL FG_TCXFER(0,159,0,99,160, 99,0,0)
      CALL FG_TCXFER(0,319,0,99,  0,199,0,0)
      CALL FG_WAITKEY

      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET

      STOP ' '
      END
